#ifndef MODULEINTERFACE_H
#define MODULEINTERFACE_H

#include <QObject>

//这个接口通常是和网络模块一起使用的，因此需要写好结束数据后的操作，底层会将数据传递过来
class ModuleInterface : public QObject
{
    Q_OBJECT

public:
    ModuleInterface(const ModuleInterface &) = delete;
    virtual ~ModuleInterface() = default;
    ModuleInterface operator=(const ModuleInterface &) = delete;
    virtual bool initialize() = 0;
    virtual QByteArray execute() = 0;
    virtual bool handleReceiveData(const QByteArray &receiveData) = 0;

protected:
    explicit ModuleInterface() = default;
};

#endif // MODULEINTERFACE_H
